package cn.com.nes.site.controller.project.vo;

import cn.com.nes.site.entity.vo.BaseVO;
import cn.com.nes.site.service.project.bo.SetProjectServiceUserAreaCodeBO;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class SetProjectServiceUserAreaCodeVO extends BaseVO {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID")
    private Long id;

    /**
     * 服务范围区划代码
     */
    @NotEmpty(message = "服务范围区划代码")
    private List<String> areaCodeList;


    public SetProjectServiceUserAreaCodeBO convertToBo() {
        SetProjectServiceUserAreaCodeBO bo = new SetProjectServiceUserAreaCodeBO();
        BeanUtils.copyProperties(this, bo);
        bo.setProjectServiceUserAuthId(this.getId());
        return bo;
    }

}
